-- GENERATED SPELL FOR [Megalith] --


function spell0_24371(pUnit, Event) --@Boulder,n/a--
pUnit:FullCastSpellOnTarget(50086,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24371', 1000, 1)
end

function spell1_24371(pUnit, Event) --@Hulking Uppercut,n/a--
pUnit:FullCastSpellOnTarget(50084,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_24371', 537, 1)
end

function Sorts_24371(pUnit, Event)
local choix_sorts_24371 = math.random(0, 1)
if choix_sorts_24371 == 0 then
pUnit:RegisterEvent('spell0_24371', 1, 1)
end
if choix_sorts_24371 == 1 then
pUnit:RegisterEvent('spell1_24371', 1, 1)
end
end

function mob24371_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_24371', math.random(1500, 3000), 1)
end

function mob24371_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24371_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob24371_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(24371, 1, 'mob24371_Action')
RegisterUnitEvent(24371, 2, 'mob24371_Leave')
RegisterUnitEvent(24371, 3, 'mob24371_Kill')
RegisterUnitEvent(24371, 4, 'mob24371_Die')
